import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import "@/styles/common.scss"
import { LazyLoad } from "@/directives/index.js"
import{componentPlugin} from "@/components/index.js";
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)//使用pinia-plugin-persistedstate插件,作用是将状态持久化存储到localStorage中，刷新页面后依然存在相印数据
const app = createApp(App)
app.use(pinia)
app.use(router)
app.use(LazyLoad)
app.use(componentPlugin)
app.mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


